from flask import Flask
from config import Config
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)

#设置连接数据库的URL
app.config.from_object(Config)
db = SQLAlchemy(app)

class User(db.Model)

    # 定义列对象
    id = db.Column(db.Integer, primary_key=True,autoincrement=True)
    name = db.Column(db.String(64), unique=True)
   
#删除表
# db.drop_all()

#创建表：
db.create_all()


@app.route('/add')
def add():
    
    return 'ok'


if __name__ == '__main__':
    app.run()